package lyt.demo4.demos.web.service;

import lyt.demo4.demos.web.dao.Sys_roleDao;
import lyt.demo4.demos.web.entity.Sys_role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Sys_roleServicelmpl implements Sys_roleService {

    @Autowired
    private Sys_roleDao sys_roleDao;

    @Override
    public void addRole(Sys_role role) {
        sys_roleDao.addRole(role);
    }

    @Override
    public void updateRole(Sys_role role) {
        sys_roleDao.updateRole(role);
    }

    @Override
    public void deleteRole(Long id) {
        sys_roleDao.deleteRole(id);
    }

    @Override
    public Sys_role getRole(Long id) {
        return sys_roleDao.getRole(id);
    }

    @Override
    public List<Sys_role> getAllRoles() {
        return sys_roleDao.getAllRoles();
    }
}
